import request from "@/utils/request";

export function getAllLotteryTypes(params) {
    return request({
        url: "/api/getAllTypes",
        method: "post",
        data: params
    });
}

export function addLotteryType(data) {
    return request({
        url: "/api/addType",
        method: "post",
        data
    });
}

export function updateLotteryType(data) {
    return request({
        url: "/api/updateType",
        method: "post",
        data
    });
}

export function deleteLotteryType(data) {
    return request({
        url: "/api/deleteType",
        method: "post",
        data
    });
}

export const getLotteryHistory = (data) => {
    return request({
        url: "/api/getLotteryHistory",
        method: "post",
        data
    });
};


export const generateUniqueDrawNumber = (data) => {
    return request({
        url: "/api/generateUniqueDrawNumber",
        method: "post",
        data
    });
};

export const saveToHistory = (data) => {
    return request({
        url: "/api/saveToHistory",
        method: "post",
        data
    });
};


export const initializeHistoryData = (data) => {
    return request({
        url: "/api/initializeHistoryData",
        method: "post",
        data
    });
};

export const addRecord = (data) => {
    return request({
        url: "/api/addRecord",
        method: "post",
        data
    });
};

export const updateRecord = (data) => {
    return request({
        url: "/api/updateRecord",
        method: "post",
        data
    });
};


export const deleteRecord = (data) => {
    return request({
        url: "/api/deleteRecord",
        method: "post",
        data
    });
};

export const syncLotteryResult = (data) => {
    return request({
        url: "/api/syncLotteryResult",
        method: "post",
        data
    });
};
